<!doctype html>
<html>

<head>
	<meta charset="UTF-8">
	<title>完成付款</title>
	<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
	<link href="../css/mui.min.css" rel="stylesheet" />
	<link rel="stylesheet" href="../css/style.css" />
	<link rel="stylesheet" href="../css/iconfont.css" />
	<link rel="stylesheet" href="../css/wallet.css" />
</head>

<body>
	<nav class="mui-bar mui-bar-tab">
		<a id="cut_cd_1" class="mui-tab-item" href="http://127.0.0.1:8020/call2.html?foot_active=1"><span class="mui-icon iconfont icon-dianhua"></span><span class="mui-tab-label">电话</span></a>
		<a id="cut_cd_2" class="mui-tab-item mui-active" href="http://127.0.0.1:8020/index.html?foot_active=2"><span class="mui-icon  iconfont icon-shouye"></span><span class="mui-tab-label">首页</span></a>
		<a id="cut_cd_3" class="mui-tab-item" href="http://127.0.0.1:8020/shoplist.html?foot_active=3"><span class="mui-icon iconfont icon-fujin"></span><span class="mui-tab-label">附近</span></a>
		<a id="cut_cd_4" class="mui-tab-item" href="http://127.0.0.1:8020/member/index.html?foot_active=4"><span class="mui-icon iconfont icon-huiyuan"></span><span class="mui-tab-label">我的</span></a>
	</nav>
	<div class="mui-content">
		<div class="fukc_top">
			<div class="iconfont icon-xuanze"></div>
			<p>支付成功</p>
			<div class="fukc_pribox"><em id='pay_money'></em></div>
		</div>
		<div class="fukc_djh clearfix">
			<span class="left"></span>
			<span class="right" id='sn'></span>
		</div>
		<div class="fukc_xq clearfix">
			<div class="left"></div>
			<div class="right">
				<p class="clearfix">
					<Span class="pleft" id='pay_model'></Span>
					<span class="pright"><em id='pay_model_money'></em></span>
				</p>
			
				<p class="clearfix zengsong" style="display: none;">
					<Span class="pleft"></Span>
					<span class="pright"><em id='s_pay_score'></em></span>
				</p>
			</div>
		</div>
		<div class="qitsj_lisbox">
			<div class="bt"></div>
			<ul class="qitsj_lis" id='item_ul'>
				
			</ul>
		</div>
	</div>
	<script src="../js/mui.min.js"></script>
	<script type="text/javascript">
		mui.init()
	</script>
</body>
</html>
<script src="../js/mui.min.js"></script>
<script src="../js/zepto.min.js"></script>
<script type="text/javascript" src="../js/date.js"></script>

<script type="text/javascript" src="../js/jquery.min.js"></script>
<script type="text/javascript" src="../js/layer/layer.min.js"></script>
<script type="text/javascript" src="../js/app.js"></script>
<script>
	$(function(){
		getAddress();
		Axis = JSON.parse(localStorage.getItem('axis'));
		var store_id = "";
		//获取付款信息
		$.ajax({
			//type: 'post',
			url: APP.api_url + 'wallet/pay_info1',
			data: {
					order_id			: getUrlParam('order_id'),
					longitude	: Axis.longitude,
					latitude	: Axis.latitude
			},
			success: function(data) {
				if(data.code == 200){
					paylog = data.data.pay_log;
					store_id=data.agent_id;
//					$("#pay_money").text(paylog.price); 		//实付金额
//					$("#pay_model_money").text(paylog.price);	//应付金额
					
					if(paylog.zs_score>0){
						$(".zengsong").show();
						$("#s_pay_score").text(paylog.price );
					}
					
					$("#sn").text(paylog.sn)
					union_item = data.data.union_item;
					var item_htm="";
					for(var i=0;i<union_item.length;i++){
						//图片地址
						var img = user_tupian(union_item[i].thumb,'../images/bgtu.jpg');
						
						var jl = union_item[i].juli;
						var unit = "m";
						if(jl>1000){
							jl = jl/1000;
							unit = "km";
						}
						item_htm =  "<li class='clearfix'><div class='tjsj_img' onclick ='goto_shop("+store_id+","+union_item[i].agent_id+")'>"+
									"<img src='"+img+"'></div>"+
									"<div class='tjsj_info'><div class='tjsj_nam'>"+
									"<div class='name'>"+union_item[i].name+"</div>"+
									"<div class='iconfont icon-new'></div></div>"+
									"<div class='tjsj_jif'>鼓励金最高可抵<em>"+union_item[i].ad_score+"%</em></div>"+
									"<div class='tjsj_dzbox clearfix'>"+
									"<div class='tjsj_dz'>"+union_item[i].address+"</div>"+
									"<div class='tjsj_jul'>"+jl+unit+"</div>"+
									"</div></div></li>";
						$("#item_ul").append(item_htm);
					}
					
				}
			}
		});
	})
	function goto_shop(uion_agent,stor_id){
			sessionStorage.setItem("uion_agent", uion_agent);
			location.href = '../shop.html?store_id='+stor_id;
		}
</script>